<{include file="scenter/block/header.html"}>
<div class="ucenter_t">
    <ul><li class="on">修改优惠活动</li></ul>
    <span class="r"><a href="<{link ctl='scenter/shop/youhui:index'}>" class="pbtn">优惠活动管理</a></span>
</div>
<div class="ucenter_c">
<{if $group.priv.allow_youhui < 0}>
    <p class="tips"><span class="lock">您是【<b class="red"><{$group.group_name}></b>】没有权限添加优惠活动</span></p>
<{/if}>
<form action="<{link ctl='scenter/shop/youhui:edit'}>" mini-form="ucenter" method="post" ENCTYPE="multipart/form-data">
<input type="hidden" name="youhui_id" value="<{$detail.youhui_id}>" />
<table cellspacing="0" cellpadding="0" class="form">
    <tr><th><span class="red">*</span>标题：</th><td><input type="text" name="data[title]" value="<{$detail.title}>" class="input"/></td></tr>
    <tr><th><span class="red">*</span>地区：</th>
        <td>
            <label><b class="blue"><{$shop.city_name}></b></label>&nbsp;&nbsp;&nbsp;&nbsp;
            <label><select name="data[area_id]" class="select w-100"><{widget id="data/area" value=$detail.area_id city_id=$detail.city_id}></select></label>
        </td>
    </tr>
    <tr><th>图片：</th><td><{if $detail.thumb}><img src="<{$pager.img}>/<{$detail.thumb}>" photo="<{$pager.img}>/<{$detail.thumb}>" class="wh-100"/><{/if}><input type="file" name="youhui_thumb" class="input" /></td></tr>
    <tr><th>有效期：</th>
        <td>
            <input type="text" name="data[stime]" value="<{$detail.format_stime|default:''}>" date="stime" class="input w-100"/>~
            <input type="text" name="data[ltime]" value="<{$detail.format_ltime|default:''}>" date="ltime" class="input w-100"/>
            <span class="tip-comment">"0"或空不限</span>
         </td>
    </tr>
    <tr><th>描述：</th><td><textarea name="data[content]" kindeditor="full" style="width:700px;height:350px;"><{$detail.content}></textarea></td></tr>
    <tr><th></th><td><{if $group.priv.allow_youhui<0}><input type="button" value="没有权限" disabled="disabled" class="mpbtn" /><{else}><input type="submit" value="提交数据" class="green_btn" /><{/if}></td></tr>
</table>
</form>
</div>
<script type="text/javascript" src="<{$pager.res}>/kindeditor/kindeditor.js"></script>
<script type="text/javascript">
(function(K, $){
<{if $group.priv.allow_youhui < 0}>
var editor = KindEditor.create('textarea[kindeditor]',{readonlyMode : true});
$("[mini-form] input,[mini-form] select,[mini-form] textarea").attr("disabled", "disabled");
<{else}>
var editor = KindEditor.create('textarea[kindeditor]',{uploadJson : '<{link ctl="magic:editorupload"}>', extraFileUploadParams:{OTOKEN:"<{$OTOKEN}>"}});
<{/if}>
})(window.KT, window.jQuery);
</script>
<{include file="scenter/block/footer.html"}>